<%@ page import="psychoproject.Person" %>



<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'name', 'error')} required">
	<label for="name">
		<g:message code="person.name.label" default="Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="name" maxlength="30" required="" value="${personInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'lastName', 'error')} required">
	<label for="lastName">
		<g:message code="person.lastName.label" default="Last Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="lastName" maxlength="30" required="" value="${personInstance?.lastName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'address', 'error')} ">
	<label for="address">
		<g:message code="person.address.label" default="Address" />
		
	</label>
	<g:textField name="address" maxlength="15" value="${personInstance?.address}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'phone', 'error')} ">
	<label for="phone">
		<g:message code="person.phone.label" default="Phone" />
		
	</label>
	<g:textField name="phone" maxlength="10" value="${personInstance?.phone}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'latterStudy', 'error')} required">
	<label for="latterStudy">
		<g:message code="person.latterStudy.label" default="Latter Study" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="latterStudy" required="" value="${personInstance?.latterStudy}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'genre', 'error')} required">
	<label for="genre">
		<g:message code="person.genre.label" default="Genre" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="genre" from="${personInstance.constraints.genre.inList}" required="" value="${personInstance?.genre}" valueMessagePrefix="person.genre"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'country', 'error')} required">
	<label for="country">
		<g:message code="person.country.label" default="Country" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="country" from="${personInstance.constraints.country.inList}" required="" value="${personInstance?.country}" valueMessagePrefix="person.country"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'city', 'error')} required">
	<label for="city">
		<g:message code="person.city.label" default="City" />
		<span class="required-indicator">*</span>
	</label>
	<g:select name="city" from="${personInstance.constraints.city.inList}" required="" value="${personInstance?.city}" valueMessagePrefix="person.city"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'email', 'error')} required">
	<label for="email">
		<g:message code="person.email.label" default="Email" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="email" name="email" required="" value="${personInstance?.email}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'bornDate', 'error')} required">
	<label for="bornDate">
		<g:message code="person.bornDate.label" default="Born Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="bornDate" precision="day"  value="${personInstance?.bornDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'cellPhone', 'error')} required">
	<label for="cellPhone">
		<g:message code="person.cellPhone.label" default="Cell Phone" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="cellPhone" required="" value="${personInstance?.cellPhone}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'experience', 'error')} ">
	<label for="experience">
		<g:message code="person.experience.label" default="Experience" />
		
	</label>
	<g:textField name="experience" value="${personInstance?.experience}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: personInstance, field: 'security', 'error')} required">
	<label for="security">
		<g:message code="person.security.label" default="Security" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="security" name="security.id" from="${psychoproject.Security.list()}" optionKey="id" required="" value="${personInstance?.security?.id}" class="many-to-one"/>
</div>

